package com.atguigu.bean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

@Component
public class MyBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beaName) throws BeansException {
        System.out.println("postProcessBeforeInitialization...  beaName:" + beaName + "=> bean:" + bean);
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beaName) throws BeansException {
        System.out.println("postProcessAfterInitialization...  beaName:" + beaName + "=> bean:" + bean);
        return bean;
    }
}
